home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / programm / prog_a2m / fortran / bcfman.txt < prev    next >
Text File  |  1995-05-02  |  22KB  |  540 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.              *******************************************
  7.              *                                         *
  8.              *        BC-FORTRAN77 Version 1.3C        *
  9.              *                                         *
  10.              *             Copyright ╜ 1990            *
  11.              *                                         *
  12.              *              Andre Koestli              *
  13.              *        Martin-Luther-Strasse 63         *
  14.              *          W-7000 Stuttgart 50            *
  15.              *       Federal Republic of Germany       *
  16.              *                                         *
  17.              *******************************************
  18.  
  19.  
  20.  
  21. 1.  PREFACE
  22. ===========
  23.  
  24.  
  25. About this text
  26. ---------------
  27.  
  28. The following text is a short introduction to the BC-FORTRAN77 Version C
  29. development system, written by Andre Koestli. He holds the copyright of
  30. this product, but does allow everybody to use it for noncommercial and
  31. nonmilitary applications.
  32.  
  33.  Florian Nold (email address MEHA@DFRRUF1.BITNET) translated the original
  34. german documents into english and has provided a supplementary dictionary
  35. explaining the error and warning messages (see appendix). Many thanx to
  36. Mr. Ken McNorton for reading and correcting this text. The original
  37. german introduction (file lies.txt) has also been included.
  38.  
  39. If you find any mistakes in this english translation please write them to
  40. Florian Nold. Errors and suggestions to the BC-FORTRAN77 system itself
  41. have to be send to the author A. Koestli himself, since Florian Nold has
  42. NO connection whatsoever with him.
  43.  
  44.  
  45. Preface by the author of BC-FORTRAN77
  46. -------------------------------------
  47.  
  48. Version 'C' of BC-FORTRAN77, consisting of the following 7 described
  49. files, was completely developed by Andre Koestli. I, Andre Koestli,
  50. allow the general use of Version 'C' for noncommercial applications.
  51. All rights remain entirely by me. I do not permit the sale of Version 'C'
  52. under any circumstances, not even in connection with other products.
  53. This text may not be changed and it has to be included with every copy
  54. of Version 'C'. For commercial applications Version 'P' must be used
  55. (see below).
  56.  
  57. It is STRICTLY forbidden to use BC-FORTRAN77 Version 'C' for any military
  58. purpose or research.
  59.  
  60. March 1990, A. Koestli
  61.  
  62.  
  63. BC-FORTRAN77 version 'C' is part of an extensive development system
  64. called version 'P' (see below). The purpose of version 'C' is to make a
  65. FORTRAN77 compiler available for programming courses. Another advantage
  66. is that BC-FORTRAN77 is available for Amiga, Atari ST and MS-DOS
  67. computers.
  68.  
  69.  
  70. 2.  BC-FORTRAN77 version 'P'
  71. ============================
  72.  
  73.  
  74. BC-FORTRAN77 version 'P' is a large development system, consisting of a
  75. compiler, linker, editor, precompiler and a version managment system,
  76. which are all embedded in a user friendly desktop shell. This shell only
  77. compiles source, which has been changed since the last compiler run.
  78. So even large programs, consisting of hundreds of subroutines, will be
  79. processed in a few seconds. Version 'P' supports the use of a mathema-
  80. tical coprocessor and special 68020 commands.
  81.  
  82. Version 'P' includes a comfortable debugger for interactively testing
  83. programs. Supplementary libraries (e.g. plot output) are also included.
  84.  
  85. The price of version 'P' is 350 DM (incl. manual, 150 pages). To order
  86. verison 'P' please write directly to A. Koestli. At the moment Version
  87. 'P' is only available for ATARI ST and Amiga, not for MS-DOS machines.
  88.  
  89.  
  90. 3.  BC-FORTRAN77 Version C
  91. ==========================
  92.  
  93.  
  94. BC-FORTRAN77 version 'C', which is described in the rest of this text,
  95. includes the following files:
  96.  
  97.       LIES.TXT    original german version of this text, written  by Andre
  98.                   Koestli, the author of BC-FORTRAN77.
  99.                   ('lies' is the german word for 'read')
  100.       BCFMAN.TXT  this text
  101.       BCFMAN.TEX  TeX/LaTeX version of this text
  102.       BCF.TTP     the compiler
  103.       BCL.TTP     the linker
  104.       BCRTSY.B    the runtime library
  105.       MATHLIB.B   library (incl. FORTRAN77 standard functions)
  106.  
  107. Be sure to include ALL these files without any changes when copying
  108. BC-FORTRAN77.
  109.  
  110. Using a command-line-interpreter or a shell (e.g. gulam) would be the
  111. best way to work with BC-FORTRAN77. If you don't have any shell, you can
  112. start BC-FORTRAN77 from the desktop. Filenames and options can be entered
  113. in the dialogbox, which appears after double clicking the program icons.
  114.  
  115.  
  116. 4.  The Installation
  117. ====================
  118.  
  119.  
  120. The simplest way is to put all the files in the same directory. If you
  121. prefer to store the binaries, sources, etc. in distinct directories, put
  122. BCF.TTP and BCL.TTP in the directory, where the shell would search for
  123. the bin-stuff.
  124. BCRTSY.B and MATHLIB.B should be moved to the directory \BC of the actual
  125. drive.
  126.  
  127.  
  128. 5.  The Compiler BCF.TTP
  129. ========================
  130.  
  131.  
  132. To invoke the compiler enter
  133.  
  134.       BCF [-options] filename
  135. or
  136.       double click on the BCF.TTP-icon on the desktop and enter options
  137.       and filename.
  138.  
  139. If the filename does not contain any point, the extension .F will be
  140. appended. In any case the compiler will write its output to the file
  141. filename.B.
  142.  
  143. Examples:
  144.  
  145.       BCF -D TEST.F     compile the file TEST.F to TEST.B using the
  146.                         debug-option
  147.       BCF TEST SUB      compile the file TEST.F to TEST.B and SUB.F to
  148.                         SUB.B
  149.       BCF TEST.X        compile the file TEST.X to TEST.B
  150.  
  151.  
  152. Compiler Options
  153. ----------------
  154.  
  155.       -D    Debug, equivalent to -BVL.
  156.       -B    deBugcode, uses -H implicit, generate code to check
  157.             arraybounds and substrings.
  158.       -H    parcHeck, generate code to check parameter lists and stack
  159.             overflow.
  160.       -V    Varlist, generate list of variables used by the debugger
  161.       -L    Lineslist, generate list of linenumbers for the debugger
  162.       -U    Uppercase, convert lowercase characters to uppercase
  163.             (except character constants and FORMAT statements).
  164.             If this option is not specified the compiler will treat
  165.             xy, xY, Xy, XY as 4 different variables !
  166.       -F    Freeinput, allows Free-Form-Input-Format (not standard !)
  167.       -P    Protocol, print compiler listing.
  168.       -W    Wait for RETURN key when compiler has finished.
  169.  
  170.  
  171. Language-Extensions and Restrictions
  172. ------------------------------------
  173.  
  174. BC-FORTRAN77 supports the fully FORTRAN77 standard defined by ANSI/ISO.
  175. This standard is often ignored by some special features. I do not
  176. recommend the use of these extensions, because they do not comply with
  177. the ANSI standard and are therefore not precisely defined.
  178.  
  179. The most important specialities are:
  180.  
  181.       INTEGER*1         8 bit INTEGER
  182.       INTEGER*2         16 bit INTEGER
  183.       INTEGER*4         same as INTEGER
  184.       LOGICAL*1         8 bit LOGICAL
  185.       LOGICAL*2         8 bit LOGICAL
  186.       LOGICAL*4         same as LOGICAL
  187.       IMPLICIT NONE     turn off all implicit typedefs
  188.       COMMON /adr/      absolute addressed COMMON, adr may be a constant
  189.                         or a simple variable
  190.       EQUIVALENCE()     between CHARACTER and other types and mixing in
  191.                         COMMON blocks
  192.  
  193.       recursive subroutine calls
  194.       max. length of names: 8 chars. (standard 6 chars.)
  195.  
  196.  
  197. The most important restrictions are:
  198.  
  199.       32kB  code per subroutine
  200.       32kB  SAVE/DATA per subroutine or BLOCK DATA
  201.       700   subroutines per file
  202.       500   different COMMON blocks per file
  203.  
  204. There are also some restrictions, which would cause a compile-time-error,
  205. if subroutines are unreasonable large. In most cases the 32kB limit would
  206. be exceeded anyway.
  207.  
  208.  
  209. 6.  The Linker BCL.TTP
  210. ======================
  211.  
  212.  
  213. To invoke the linker just type
  214.  
  215.       BCL [-options] filename ..
  216.  
  217. or click the BCL.TTP icon on the desktop and enter options and filenames.
  218.  
  219. If the filename doesn't contain any point, the extension .B will be
  220. appended. The executable program will be stored using the name of the
  221. first file and the extension .PRG. If the source contains any mathemati-
  222. cal standard function calls the file MATHLIB.B must be specified too.
  223. The runtime system BCRTSY.B will be linked automatically.
  224.  
  225. Example:
  226.  
  227.       BCL -S16 TEST SUB MATHLIB
  228. or
  229.       BCL -S16 TEST.B SUB.B MATHLIB.B
  230.  
  231. will link the files TEST.B and SUB.B. The name of the resulting execu-
  232. table will be TEST.PRG (stacksize 16kB).
  233.  
  234.  
  235. Linker Options
  236. --------------
  237.  
  238.       -Sn   Stacksize of the resulting executable is set to n kB.
  239.             If this option is not specified, a very large stack will be
  240.             assumed. The stack is used to store all local variables/
  241.             arrays of nested subroutine calls.
  242.       -O    Optimize: remove unused functions in order to reduce code
  243.             size
  244.       -P    Protocol: generate listing of COMMON blocks and program
  245.             modules
  246.       -W    Wait for RETURN key when finished
  247.  
  248.  
  249. Restrictions
  250. ------------
  251.  
  252. The most important restriction is the RAM size: the generated program
  253. file (without COMMON blocks and stack) may be as large as the largest
  254. remaining free memory block after loading the linker. On the other hand
  255. it's also possible to generate a program with very large COMMON blocks
  256. or stack, that runs out of memory while loading or executing.
  257.  
  258. The max. number of subroutines is restricted to 3000, the max. number of
  259. COMMON blocks is 1500.
  260.  
  261.  
  262. The Runtime System BCRTSY.B
  263. ---------------------------
  264.  
  265. The runtime system BCRTSY.B contains stuff needed by every BC-FORTRAN77
  266. program. Therefore it will be linked automatically by BCL.TTP.
  267.  
  268. BCRTSY.B consists of:
  269.  
  270.       arithmetic routines
  271.             32 bit INTEGER multiplication/divison
  272.             REAL arithmetics
  273.             DOUBLE PRECISION arithmetics: in order to increase perfor-
  274.             mance a special internal floating point number representation
  275.             is used. These subroutines are much more tuned to speed than
  276.             to accuracy.
  277.             REAL: 6 decimal digits, 32 bit, 1 bit sign, 23 bit mantissa,
  278.             8 bit exponent
  279.             DOUBLE PRECISION: 13 decimal digits, 64 bit, 1 bit sign,
  280.             47 bit mantissa, 16 bit exponent
  281.             Math. coprocessor is not supported by Version 'C'.
  282.  
  283.       CHARACTER routines
  284.       I/O routines
  285.       Debugger: a tiny debugger is included too. After every error
  286.                 message the debugger waits for your reaction.
  287.                 The debugger may also be activated by pressign the
  288.                 ALT-key, to stop a running program. The following command
  289.                 keys are supported:
  290.                   S     print the subroutine call Stack and the line
  291.                         number (if the compiler option -L has been
  292.                         specified)
  293.                   V     print the Variables and their contents of the
  294.                         actual subroutine (only if the compiler option
  295.                         -V has been specified)
  296.                   Z     terminate program
  297.                 space   continue, in the case that no runtime error has
  298.                         occured. If you press the ALT-key simultaneously,
  299.                         only the next program step will be executed
  300.                         (e.g. next label, subroutine, ELSE, ENDIF, DO, )
  301.  
  302.  
  303. The Standard Library MATHLIB.B
  304. ------------------------------
  305.  
  306. MATHLIB.B contains all the mathematical functions described by the ANSI
  307. standard. If the linker issues an error message like 'External nicht
  308. gefunden: f_SQRT' (german text for 'external not found') you have to
  309. specify MATHLIB.B when running the linker BCL.TTP.
  310.  
  311.  
  312. Starting your Program
  313. ---------------------
  314.  
  315. Every executable program produced by BCL can be started like any other
  316. program from the desktop or a shell.
  317.  
  318.  
  319. 7.  Error Messgages
  320. ===================
  321.  
  322.  
  323. The error messages produced by the compiler, the linker and the runtime
  324. system should be self explainatory and are supplemented with the
  325. following short list of messages. A complete list of errors (26 pages of
  326. the version P manual) would exceed this short description.
  327.  
  328. IO-Errors
  329. ---------
  330.  
  331. Input-Output-Errors. If you specify the IOSTAT parameter, you get the
  332. error number (see below) for the operation attempted in the IOSTAT data
  333. item.
  334.  
  335.    number   description
  336.  
  337.      -1     end of file (EOF) reached
  338.      -2     EOF reached while processing a record
  339.       1     filenumber already used (OPEN)
  340.       2     too many files (OPEN), max. 32 files
  341.       3     filename too long (OPEN), max. 31 characters
  342.       5     filenumber (unit) not opened. Only the units 5 and 6 are
  343.             preconnected and can be used without issuing an OPEN
  344.             statement
  345.       6     formatted / unformatted I/O contradiction
  346.       7     REC-parameter specified for a sequential access file
  347.       8     BACKSPACE, REWIND, ENDFILE not allowed for this file
  348.             (e.g. AUX: or PRN:)
  349.      10     internal I/O only formatted
  350.      20     integer overflow processing an input
  351.      21     data error occured while processing list-directed input,
  352.             e.g. missing quote-character for strings
  353.      22     unexpected EOF
  354.      23     record too long
  355.      24     read error processing UNFORMATTED SEQUENTIAL input
  356.      30     format code and I/O-listelement do not fit together
  357.             INTEGER needs I-format code
  358.             REAL, DOUBLE PRECISION (COMPLEX) need one (two) F-, G-, E-
  359.             or D-format code(s)
  360.             LOGICAL need L-format code
  361.             CHARACTER need A-format code
  362.      31     format code L: T or F expected (input)
  363.      32     format code I: unexpected character found (input), only
  364.             blanks, signs and numerals are allowed
  365.      33     format code E, F, or D: unexpected character (input), only
  366.             blanks, signs, numerals, decimal-point, E, e, D or d are
  367.             allowed.
  368.      34     format code contains too many (
  369.      35     format code contains too many )
  370.      36     forbidden position for numeral series in format code
  371.      37     unknown format code
  372.      38     missing . in F, E, G or D format code
  373.      39     4Htext or 'text' in READ format code
  374.             FORTRAN66 allows to read a text for the format code, not
  375.             allowed in FORTRAN77
  376.      40     exponent to high for given format code
  377.      42     format code too long, max. length of internal record buffer
  378.             80 char.
  379.      43     internal I/O, record too long
  380.      44     TL, record too long. If the recordlength exceeds the length
  381.             of the internal record buffer, left tabbing will not work
  382.      45     field length 0 (zero) in I, L, F, E, G or D format code
  383.  
  384.  
  385. TOS Errors
  386. ----------
  387.  
  388. in general: 1000 + n --> TOS-Error -n
  389.  
  390.    number   description
  391.  
  392.     1002    drive not ready
  393.     1004    CRC error (cyclic redundancy code)
  394.     1010    write error
  395.     1011    read error
  396.     1013    disk is write protected
  397.     1014    media change detected
  398.     1016    bad sector
  399.     1017    put disk into drive
  400.     1033    file not found
  401.     1034    path not found
  402.     1035    too many files
  403.     1036    access not possible (write protected ?)
  404.     1039    out of memory (RAM)
  405.     1040    wrong memoryblock address
  406.     1046    wrong drive character (e.g. K)
  407.     1066    wrong format of program file
  408.  
  409.  
  410. 8.  Problems
  411. ============
  412.  
  413.  
  414. If you find any bug in BC-FORTRAN77 (compiler, linker or libraries)
  415. please inform the author Author A. Koestli.
  416. As you will appreciate, the author can't offer any update service or
  417. advise support by phone for this product, in contrast to the commercial
  418. version 'P'.
  419.  
  420.  
  421.                         **********************
  422.                         *                    *
  423.                         *      APPENDIX      *
  424.                         *                    *
  425.                         *  Small dictionary  *
  426.                         *                    *
  427.                         **********************
  428.  
  429.             German                              English
  430.  
  431. anfang                              beginning
  432. COMMON aus BLOCKDATA verlaengert    COMMON extended with BLOCK DATA
  433. COMMON in mehreren BLOCKDATA        COMMON in several BLOCK DATA
  434. Character Konstante erwartet        expected character constant
  435. Dataliste laenger Wertliste         datalist longer than valuelist
  436. Dataliste zu lang                   datalist too long
  437. Deklaration hier nicht erlaubt      declaration not allowed at this point
  438. Dimension fehlt fuer                missing dimension for
  439. Doppelt                             twice
  440. drucke                              print
  441. ELSE ohne IF oder nach DO oder ELSE ELSE without IF or after DO or ELSE
  442. ENDIF ohne IF oder nach DO          ENDIF without IF or after DO
  443. Erst Initialisieren mit             first initialize with
  444. erwartet / erwartet nach            expected / expected after
  445. Exponent zu gross                   exponent too large
  446. External Widerspruch                contradiction in external
  447. External/Common nicht gefunden      external/COMMON not found
  448. falsch                              wrong, invalid
  449. Falsche Version                     wrong version
  450. Falscher Name in Function           wrong name in function
  451. Falscher Name in Subroutine         wrong name in subroutine
  452. Falscher Operator                   wrong operator
  453. Falscher Parameter                  wrong parameter
  454. Falscher Typ                        wrong typ
  455. Falsches Symbol in Dataliste        wrong symbol in datalist
  456. Falsches Symbol in Index            wrong symbol in index
  457. Falsches Wertelement                wrong value
  458. Falsches Zeichen                    wrong character
  459. Fehler                              error
  460. Fehler (Nr.) Nach [] in Zeile       error (nr.) after [] in line
  461. Fehler beim Eroeffnen von ...       error opening file ...
  462. Fehler beim Laden                   load error
  463. Fehler beim Lesen                   read error
  464. haupt                               main
  465. hier nicht erlaubt                  not allowed here
  466. Illegale Konversion                 illegal conversion
  467. illegale linke Seite                illegal left side
  468. Index ausserhalb                    index beyond
  469. Index inkorrekt                     index wrong
  470. Indexanzahl                         index quantity
  471. Indexliste                          indexlist
  472. Integer Konstantenausdruck erwartet integer constant expression expected
  473. Integerkonstante erwartet           interger constant expected
  474. Integerueberlauf                    integer overflow
  475. ist                                 is
  476. ja                                  yes
  477.  
  478. Kein Code                           no code
  479. Kein Input                          no input
  480. Kein Objfile                        no object file
  481. Keine Reloc.Info                    no relocation info
  482. Konstanten                          constants
  483. Label doppelt                       label used twice
  484. Label erwartet                      label expected
  485. Label fehlt                         label missing
  486. Laengenfehler in Objfile            length error in objfile
  487. Laengenwiderspruch COMMON           length mismatch of COMMON blocks
  488. Lesefehler                          read error
  489. Liste                               list
  490. mehrfach benutzt                    used twice
  491. Modul doppelt                       module found twice
  492. Module geloescht                    module deleted
  493. Name zu lang                        name too long
  494. neu                                 new
  495. Nicht definiertes Label             label undefined
  496. nicht gefunden                      not found
  497. Nicht genuegend RAM frei            not enough RAM
  498. Nicht genuegend Speicher            not enough memory
  499. Nicht implementiert                 not implemented
  500. Nicht lokal                         not local
  501. Nummer zu gross                     number too large
  502. Nur Variable/Array                  only variable/array
  503. oder                                or
  504. offener string                      string not closed
  505. Parameteranzahl                     number of paramters
  506. Parameterliste                      parameter list
  507. Parameterliste fehlt                parameter missing
  508. Parametername erwartet              parameter expected
  509. Parametertyp                        parameter type
  510. Schreibfehler                       write error
  511. Speicher                            memory
  512. Sprung > 32kB                       branch > 32kB
  513. Statement Nr. erwartet              statement nr. expected
  514. Statement nicht erkannt             statement not recognized
  515. Statement zu lang                   statement too long
  516. String zu lang                      string too long
  517. Substring ausserhalb                substring beyond limit
  518. Tabellenueberlauf                   table overflow
  519. Typen nicht kompatibel              types not compatible
  520. Typunkompatibilitaet                type incompatibility
  521. Typwiderspruch Dataliste/Wertliste  type mismatch datalist/valuelist
  522. Ueberlauf Codetabelle               codetable overflow
  523. Ueberlauf Objektspeicher            object-memory overflow (?)
  524. Unbekannte Option                   unknown option
  525. Ungerade Adresse                    odd memory address
  526. Variable Dimensionierung            varible dimensions
  527. Variable erforderlich nach          varible needed after
  528. warte                               wait
  529. Weiter                              continue
  530. Wertliste laenger Dataliste         valuelist longer than datalist
  531. Widerspruch Common/External         Common/External mismatch
  532. Widerspruch fuer                    mismatch in
  533. Wiederholungsfaktor -+ Zahl         repetition factor -+ number
  534. wort                                word
  535. zahl                                number
  536. Zahl oder String erwartet           number or string expected
  537. Zu viele                            too many
  538. Zu viele Comdecks                   too many Comdecks
  539. Zu viele Levels                     too many levels
  540.